import { request } from "@ruifox-cms/utils";

// 后台获取留言表单
export function selectListCommentForm(params) {
  return request({
    
    url: "/comment/api/commentForm/selectList",
    method: "get",
    params,
  });
}
//前台获取留言表单
export function selectAvailableCommentForm(params) {
  return request({
    
    url: "/comment/api/commentForm/selectAvailable",
    method: "get",
    params,
  });
}
// 根据id获取留言表单
export function selectByIdCommentForm(id) {
  return request({
    
    url: `/comment/api/commentForm/selectById?id=${id}`,
    method: "get",
  });
}

// 新增留言表单
export function insertCommentForm(data) {
  return request({
    
    url: "/comment/api/commentForm/insert",
    method: "post",
    data,
  });
}

// 修改留言表单
export function updateCommentForm(data) {
  return request({
    
    url: "/comment/api/commentForm/update",
    method: "post",
    data,
  });
}
// 删除留言表单
export function deleteCommentForm(params) {
  return request({
    
    url: "/comment/api/commentForm/delete",
    method: "delete",
    params,
  });
}
//是否启用留言表
export function updateStatusCommentForm(data) {
  return request({
    
    url: "/comment/api/commentForm/updateStatus",
    method: "post",
    data,
  });
}
//批量修改状态
export function batchUpdateStatusCommentForm(data) {
  return request({
    
    url: "/comment/api/commentForm/batchUpdateStatus",
    method: "post",
    data,
  });
}
